_STD -> _VSTD to avoid macro clash on windows git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/unordered_map b/include/unordered_map index a75ff18..394be32 100644 --- a/include/unordered_map +++ b/include/unordered_map
@@ -481,9 +481,9 @@ void operator()(pointer __p) _NOEXCEPT { if (__second_constructed) - __alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.second)); + __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.second)); if (__first_constructed) - __alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.first)); + __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.first)); if (__p) __alloc_traits::deallocate(__na_, __p, 1); } @@ -731,7 +731,7 @@ class = typename enable_if<is_constructible<value_type, _A0>::value>::type> _LIBCPP_INLINE_VISIBILITY pair<iterator, bool> emplace(_A0&& __a0) - {return __table_.__emplace_unique(_STD::forward<_A0>(__a0));} + {return __table_.__emplace_unique(_VSTD::forward<_A0>(__a0));} #ifndef _LIBCPP_HAS_NO_VARIADICS @@ -749,7 +749,7 @@ class = typename enable_if<is_constructible<value_type, _A0>::value>::type> _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator, _A0&& __a0) - {return __table_.__emplace_unique(_STD::forward<_A0>(__a0)).first;} + {return __table_.__emplace_unique(_VSTD::forward<_A0>(__a0)).first;} #ifndef _LIBCPP_HAS_NO_VARIADICS @@ -757,8 +757,8 @@ class = typename enable_if<is_constructible<key_type, _A0>::value>::type> _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator, _A0&& __a0, _Args&&... __args) - {return emplace(_STD::forward<_A0>(__a0), - _STD::forward<_Args>(__args)...).first;} + {return emplace(_VSTD::forward<_A0>(__a0), + _VSTD::forward<_Args>(__args)...).first;} #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -769,7 +769,7 @@ class = typename enable_if<is_constructible<value_type, _P>::value>::type> _LIBCPP_INLINE_VISIBILITY pair<iterator, bool> insert(_P&& __x) - {return __table_.__insert_unique(_STD::forward<_P>(__x));} + {return __table_.__insert_unique(_VSTD::forward<_P>(__x));} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator, const value_type& __x) @@ -779,7 +779,7 @@ class = typename enable_if<is_constructible<value_type, _P>::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator, _P&& __x) - {return insert(_STD::forward<_P>(__x)).first;} + {return insert(_VSTD::forward<_P>(__x)).first;} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _InputIterator> void insert(_InputIterator __first, _InputIterator __last); @@ -960,21 +960,21 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) - : __table_(_STD::move(__u.__table_)) + : __table_(_VSTD::move(__u.__table_)) { } template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( unordered_map&& __u, const allocator_type& __a) - : __table_(_STD::move(__u.__table_), __a) + : __table_(_VSTD::move(__u.__table_), __a) { if (__a != __u.get_allocator()) { iterator __i = __u.begin(); while (__u.size() != 0) __table_.__insert_unique( - _STD::move(__u.__table_.remove((__i++).__i_)->__value_) + _VSTD::move(__u.__table_.remove((__i++).__i_)->__value_) ); } } @@ -1016,7 +1016,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value) { - __table_ = _STD::move(__u.__table_); + __table_ = _VSTD::move(__u.__table_); return *this; } @@ -1045,11 +1045,11 @@ { __node_allocator& __na = __table_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _D(__na)); - __node_traits::construct(__na, _STD::addressof(__h->__value_.first), - _STD::forward<_A0>(__a0)); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_.first), + _VSTD::forward<_A0>(__a0)); __h.get_deleter().__first_constructed = true; - __node_traits::construct(__na, _STD::addressof(__h->__value_.second), - _STD::forward<_Args>(__args)...); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_.second), + _VSTD::forward<_Args>(__args)...); __h.get_deleter().__second_constructed = true; return __h; } @@ -1065,8 +1065,8 @@ { __node_allocator& __na = __table_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _D(__na)); - __node_traits::construct(__na, _STD::addressof(__h->__value_), - _STD::forward<_A0>(__a0)); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_), + _VSTD::forward<_A0>(__a0)); __h.get_deleter().__first_constructed = true; __h.get_deleter().__second_constructed = true; return __h; @@ -1081,8 +1081,8 @@ pair<typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator, bool> unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace(_A0&& __a0, _Args&&... __args) { - __node_holder __h = __construct_node(_STD::forward<_A0>(__a0), - _STD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(_VSTD::forward<_A0>(__a0), + _VSTD::forward<_Args>(__args)...); pair<iterator, bool> __r = __table_.__node_insert_unique(__h.get()); if (__r.second) __h.release(); @@ -1098,11 +1098,11 @@ { __node_allocator& __na = __table_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _D(__na)); - __node_traits::construct(__na, _STD::addressof(__h->__value_.first), __k); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_.first), __k); __h.get_deleter().__first_constructed = true; - __node_traits::construct(__na, _STD::addressof(__h->__value_.second)); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_.second)); __h.get_deleter().__second_constructed = true; - return _STD::move(__h); + return _VSTD::move(__h); } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES @@ -1140,7 +1140,7 @@ iterator __i = find(__k); if (__i != end()) return __i->second; - __node_holder __h = __construct_node(_STD::move(__k)); + __node_holder __h = __construct_node(_VSTD::move(__k)); pair<iterator, bool> __r = __table_.__node_insert_unique(__h.get()); __h.release(); return __r.first->second; @@ -1335,7 +1335,7 @@ class = typename enable_if<is_constructible<value_type, _A0>::value>::type> _LIBCPP_INLINE_VISIBILITY iterator emplace(_A0&& __a0) - {return __table_.__emplace_multi(_STD::forward<_A0>(__a0));} + {return __table_.__emplace_multi(_VSTD::forward<_A0>(__a0));} #ifndef _LIBCPP_HAS_NO_VARIADICS @@ -1353,7 +1353,7 @@ class = typename enable_if<is_constructible<value_type, _A0>::value>::type> _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator __p, _A0&& __a0) - {return __table_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));} + {return __table_.__emplace_hint_multi(__p.__i_, _VSTD::forward<_A0>(__a0));} #ifndef _LIBCPP_HAS_NO_VARIADICS @@ -1369,7 +1369,7 @@ class = typename enable_if<is_constructible<value_type, _P>::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(_P&& __x) - {return __table_.__insert_multi(_STD::forward<_P>(__x));} + {return __table_.__insert_multi(_VSTD::forward<_P>(__x));} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, const value_type& __x) @@ -1379,7 +1379,7 @@ class = typename enable_if<is_constructible<value_type, _P>::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, _P&& __x) - {return __table_.__insert_multi(__p.__i_, _STD::forward<_P>(__x));} + {return __table_.__insert_multi(__p.__i_, _VSTD::forward<_P>(__x));} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _InputIterator> void insert(_InputIterator __first, _InputIterator __last); @@ -1549,14 +1549,14 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( unordered_multimap&& __u) _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) - : __table_(_STD::move(__u.__table_)) + : __table_(_VSTD::move(__u.__table_)) { } template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( unordered_multimap&& __u, const allocator_type& __a) - : __table_(_STD::move(__u.__table_), __a) + : __table_(_VSTD::move(__u.__table_), __a) { if (__a != __u.get_allocator()) { @@ -1564,7 +1564,7 @@ while (__u.size() != 0) { __table_.__insert_multi( - _STD::move(__u.__table_.remove((__i++).__i_)->__value_) + _VSTD::move(__u.__table_.remove((__i++).__i_)->__value_) ); } } @@ -1607,7 +1607,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multimap&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value) { - __table_ = _STD::move(__u.__table_); + __table_ = _VSTD::move(__u.__table_); return *this; } @@ -1636,11 +1636,11 @@ { __node_allocator& __na = __table_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _D(__na)); - __node_traits::construct(__na, _STD::addressof(__h->__value_.first), - _STD::forward<_A0>(__a0)); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_.first), + _VSTD::forward<_A0>(__a0)); __h.get_deleter().__first_constructed = true; - __node_traits::construct(__na, _STD::addressof(__h->__value_.second), - _STD::forward<_Args>(__args)...); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_.second), + _VSTD::forward<_Args>(__args)...); __h.get_deleter().__second_constructed = true; return __h; } @@ -1656,8 +1656,8 @@ { __node_allocator& __na = __table_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _D(__na)); - __node_traits::construct(__na, _STD::addressof(__h->__value_), - _STD::forward<_A0>(__a0)); + __node_traits::construct(__na, _VSTD::addressof(__h->__value_), + _VSTD::forward<_A0>(__a0)); __h.get_deleter().__first_constructed = true; __h.get_deleter().__second_constructed = true; return __h; @@ -1672,8 +1672,8 @@ typename unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace(_A0&& __a0, _Args&&... __args) { - __node_holder __h = __construct_node(_STD::forward<_A0>(__a0), - _STD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(_VSTD::forward<_A0>(__a0), + _VSTD::forward<_Args>(__args)...); iterator __r = __table_.__node_insert_multi(__h.get()); __h.release(); return __r; @@ -1687,8 +1687,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace_hint( const_iterator __p, _A0&& __a0, _Args&&... __args) { - __node_holder __h = __construct_node(_STD::forward<_A0>(__a0), - _STD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(_VSTD::forward<_A0>(__a0), + _VSTD::forward<_Args>(__args)...); iterator __r = __table_.__node_insert_multi(__p.__i_, __h.get()); __h.release(); return __r; @@ -1732,9 +1732,9 @@ { _EqRng __xeq = __x.equal_range(__i->first); _EqRng __yeq = __y.equal_range(__i->first); - if (_STD::distance(__xeq.first, __xeq.second) != - _STD::distance(__yeq.first, __yeq.second) || - !_STD::is_permutation(__xeq.first, __xeq.second, __yeq.first)) + if (_VSTD::distance(__xeq.first, __xeq.second) != + _VSTD::distance(__yeq.first, __yeq.second) || + !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first)) return false; __i = __xeq.second; }